import 'package:flutter/material.dart';
import 'package:flutter_base_plugin/flutter_base_plugin.dart';

/// @author:  JoeKai
/// @date 2022/6/27 16:18
/// @explain：

// ignore: camel_case_types, must_be_immutable
abstract class BaseStateless<T> extends StatelessWidget {
  late T viewModel;

  BaseStateless({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    viewModel = context.watch<T>();
    // TODO: implement build
    return buildWidget(context);
  }

  Widget buildWidget(BuildContext context);
}
